﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userID"] == null)
        {
            myAccount.Visible = false;
            logOut.Visible = false;
        }
        else
            logIn.Visible = false;
    }

    protected void ClickLogIn(object sender, EventArgs e)
    {
        Response.Redirect("Login.aspx?return=" + HttpContext.Current.Request.Url.AbsolutePath);
    }
    protected void ClickLogOut(object sender, EventArgs e)
    {
        Session["userID"] = null;
        Response.Redirect(HttpContext.Current.Request.Url.AbsolutePath);

    }
    protected void ClickMyAccount(object sender, EventArgs e)
    {
        Response.Redirect("ChangePassword.aspx");
    }
    protected void ClickRankings(object sender, EventArgs e)
    {
        Response.Redirect("Rankings.aspx");

    }
    protected void ClickGames(object sender, EventArgs e)
    {
        Response.Redirect("DisplayWeek.aspx");
    }
}
